package edu.whu.xterm.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public class RefreshableLinearLayout extends LinearLayout {

	private ActionListener listener;

	public static interface ActionListener {
		static final int REFRESH = 1;

		void action(int code);
	}

	public RefreshableLinearLayout(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public RefreshableLinearLayout(Context context) {
		super(context);
	}

	public void setActionListener(ActionListener listener) {
		this.listener = listener;
	}

	protected void onCall(int code) {
		listener.action(code);
	}
}
